#ifndef _KRATOS_NETLINK_H_
#define _KRATOS_NETLINK_H_

#include <linux/nl80211.h>
#include <netlink/attr.h>

typedef int nl_callback(struct nl_msg *msg, void *arg);

typedef struct {
  int id;
  struct nl_sock *socket;
  struct nl_cb *cb1;
  int result;
} Netlink;

typedef struct {
  char ifname[30];
  int ifindex;
  int signal;
  int txrate;
} Wifi;

static struct nla_policy stats_policy[NL80211_STA_INFO_MAX + 1] = {
  [NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
};

int finish_handler(struct nl_msg*, void*);
int initNl80211(Netlink* nl, Wifi* w, nl_callback*);

#endif
